package com.drcoffee.drcoffeemall.controller;

import com.drcoffee.drcoffeemall.entry.Document;
import com.drcoffee.drcoffeemall.entry.FAQ;
import com.drcoffee.drcoffeemall.entry.Video;
import com.drcoffee.drcoffeemall.service.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/*
* 服务文档
* */
@RestController
@RequestMapping("/document")
public class DocumentController {
    @Autowired
    DocumentService documentService;

    @GetMapping("/getDocument")
    public Map<String, Object> getDocument(@RequestParam(required = false) Integer machine_id, @RequestParam String search) {
        return documentService.getDocument(machine_id, search);
    }

    @GetMapping("/getDocumentAll")
    public Map<String, Object> getDocumentAll() {
        return documentService.getDocumentAll();
    }

}
